const A = require('express');
const app = A();
app.use(A.json())

app.get('/', function(a, b) {
    b.send('Hello world~！')
});
app.get('/api/json', function(res, req) {
    req.setHeader("Access-Control-Allow-Origin", "*")
    req.json({
        name: '小马',
        age: 5
    })

})
app.listen(3028, () => {
    console.log('服务器启动了： http://localhost:3028')
})